#pragma once
#include "GameObject.h"
#include "../SGD Wrappers/SGD_Math.h"

class TripWire : public GameObject
{
	bool hasTriggered;
	int linecastFrequency;
	tVector2D direction;
	tVector2D start;
	float distance;
public:
	TripWire(void);
	virtual ~TripWire(void);

	virtual void Update(float deltaTime);
	virtual void Render(void) const;
	virtual void HandleCollision(GameObject& other, CollisionInfo& info);

	bool GetHasTriggered() const {return hasTriggered;};
	void SetDirection(tVector2D direction) {this->direction = direction;};
	//sets the position that the wire starts at - the point at which the linecast is done
	void SetStart(tVector2D startPos) {this->start = startPos;};
};

